//  import liraries
import React, { Component } from 'react';
import {
  View,
  Text,
  StyleSheet,
  Image,
  Dimensions,
} from 'react-native';
import {
  Navbar,
  HText,
} from '../DodLibrary/index';

const H16 = HText.H16;
const H24 = HText.H24;

const SCREEN_SIZE = Dimensions.get('window');

// create a component
class Home extends Component {
  render() {
    const {
      navigation,
    } = this.props;
    return (
      <View style={styles.container}>
        <Navbar
          title="Dod Library"
          leftIcon={{
            name: 'apps',
          }}
          leftOnPress={() => navigation.navigate('DrawerOpen')}
        />
        <Image
          source={require('../DodLibrary/logo.png')}
          style={{
            flex: 1,
            width: SCREEN_SIZE.width,
          }}
        />
        <View
          style={{
            alignItems: 'center',
          }}>
          <H24>Dod Library</H24>
          <H16>Give what you need now</H16>
          <H16>Give what you need in future</H16>
        </View>
      </View>
    );
  }
}

// Home.navigationOptions = ;


const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
  },
});


// make this component available to the app
export default Home;
